#include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>
int cmp(const void* a, const void* b)
{
    return *(int*)a - *(int*)b;
}
bool canMakeArithmeticProgression(int* arr, int arrSize)
{
    qsort(arr, arrSize, sizeof(int), cmp);
    int n = arr[1] - arr[0];
    for (int i = 0; i < arrSize - 1; i++)
    {
        if ((arr[i + 1] - arr[i]) != n)
        {
            return false;
        }
    }
    return true;
}

int main()
{
    int arr[] = { 1,2,4 };
    int len = sizeof(arr) / sizeof(arr[0]);
    if (canMakeArithmeticProgression(arr, len))
    {
        printf("true");
    }
    else
    {
        printf("false");
    }
    return 0;
}